﻿/***************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    This code is licensed under the Visual Studio 
    Visualization and Modeling SDK license terms.

    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
***************************************************************************/

namespace Microsoft.VisualStudio.ArchitectureTools.CodeRepositoryQuery
{
    /// <summary>
    /// Kind of target for a custom attribute
    /// </summary>
    public enum TargetKind // for custom attribute
    {
        /// <summary>
        /// This custom attributes decorates an assembly. When CustomAttribute.TargetKind == TargetKind.Assembly, CustomAttribute.Target is Assembly.Id for an Assembly
        /// </summary>
        Assembly  =1,

        /// <summary>
        /// This custom attributes decorates a Module. When CustomAttribute.TargetKind == TargetKind.Module, CustomAttribute.Target is Module.Id for a module
        /// </summary>
        Module = 2,

        /// <summary>
        /// This custom attributes decorates a type. When CustomAttribute.TargetKind == TargetKind.TypeDefinition, CustomAttribute.Target is TypeDefinition.Id for a type
        /// </summary>
        TypeDefinition = 3,

        /// <summary>
        /// This custom attributes decorates a method. When CustomAttribute.TargetKind == TargetKind.MethodDefinition, CustomAttribute.Target is MethodDefinition.Id for a method definition
        /// </summary>
        MethodDefinition  = 4,

        /// <summary>
        /// This custom attributes decorates a property. When CustomAttribute.TargetKind == TargetKind.PropertyDefinition, CustomAttribute.Target is Property.Id for a property
        /// </summary>
        PropertyDefinition = 5,

        /// <summary>
        /// This custom attributes decorates a field. When CustomAttribute.TargetKind == TargetKind.FieldDefinition, CustomAttribute.Target is Field.Id for a field
        /// </summary>
        FieldDefinition = 6,

        /// <summary>
        /// This custom attributes decorates an event. When CustomAttribute.TargetKind == TargetKind.EventDefinition, CustomAttribute.Target is Event.Id for an event
        /// </summary>
        EventDefinition = 7,

        /// <summary>
        /// This custom attributes decorates a method parameter. When CustomAttribute.TargetKind == TargetKind.MethodDefinitionParameter, CustomAttribute.Target is Parameter.Id for a parameter
        /// </summary>
        MethodDefinitionParameter = 8,

        /// <summary>
        /// This custom attributes decorates a method (with the [return: ] syntax).
        /// When CustomAttribute.TargetKind == TargetKind.MethodDefinitionReturnValue, CustomAttribute.Target is MethodDefinition.Id for a parameter
        /// </summary>
        MethodDefinitionReturnValue = 9,



        // TODO: I don't know how to express the following 2 attributes in C#

        /// <summary>
        /// This custom attributes decorates a generic type parameter. 
        /// When CustomAttribute.TargetKind == TargetKind.GenericParameterForType, CustomAttribute.Target is GenericTypeParameter.Id for a generic parameter defined on a generic type
        /// </summary>
        GenericParameterForType = 10,

        /// <summary>
        /// This custom attributes decorates a generic type parameter. 
        /// When CustomAttribute.TargetKind == TargetKind.GenericParameterForType, CustomAttribute.Target is MethodGenericTypeParameter.Id for a generic parameter defined on a method
        /// </summary>
        GenericParameterForMethod = 11
    }
}
